package com.example.test;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.test.suppert.BaseDo;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.util.Date;

/**
 * Created by lsl on 2021/2/24.
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@SuperBuilder
@Entity(name = "jpa_user")
@org.hibernate.annotations.Table(appliesTo = "jpa_user", comment = "jpa 测试项目用户表")
@TableName("jpa_user")
public class User extends BaseDo {

    @Column(length = 50)
    @TableField("name")
    private String name;

    @Column(length = 50)
    @TableField("password")
    private String password;

    @ColumnDefault("0")
    @TableField("address_count")
    private Integer addressCount;
}
